package com.songhq.data.intercepter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyWebMvcConfigurerAdapter implements WebMvcConfigurer {

	@Autowired
	private MyIntercepter myIntercepter;

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		//注册自定义拦截器，添加拦截路径和排除拦截路径
		//registry.addInterceptor(myIntercepter).addPathPatterns("/**")
		//.excludePathPatterns("/user/login/**","/error","/user/signin");
	}
}
